package com.bestdreamer.lock;

public class Demo1Run {

    public static void main(String[] args) {
        Demo1MyService service = new Demo1MyService();
        Demo1MyThreadA[] threadA = new Demo1MyThreadA[10];
        Demo1MyThreadB[] threadB = new Demo1MyThreadB[10];
        for(int i = 0; i < 10; i++){
            threadA[i] = new Demo1MyThreadA(service);
            threadB[i] = new Demo1MyThreadB(service);
            threadA[i].start();
            threadB[i].start();
        }
    }
}
